<template>
    <div class="remark-component-container">
        <remarknew v-if="topicId" :topicid="topicId"></remarknew>
        <remarkold v-else-if="params" :params="params"></remarkold>
        <div v-else>参数错误，无法获取评论数据</div>
    </div>
</template>

<script>
    import Remarkold from "./remark_old.vue"
    import Remarknew from "./remark_new.vue"

    export default {
        components: {
            Remarkold,
            Remarknew
        },
        props: {
            topicId: {
                type: String,
                default: ""
            },
            params: {
                type: Object,
                default: function () {
                    return {};
                }
            }
        },
        mounted: function () {
            let that = this;
            setTimeout(function () {
                console.log("The topicid is:" + that.topicId);
            }, 3000);
        }
    }
</script>

<style>
    .remark-component-container {
    }
</style>